Class: Gitara::Node::Bar
- Inherits:
-
Base
- Object
- Valuable
- Base
- Gitara::Node::Bar
show all
- Defined in:
- lib/gitara/node/bar.rb,
lib/gitara/node/bar/stanza_version.rb,
lib/gitara/node/bar/voiced_version.rb,
lib/gitara/node/bar/chorded_version.rb
Defined Under Namespace
Classes: ChordedVersion, StanzaVersion, VoicedVersion
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Base
#add, #ancestor, #call_value, #children=, #chorded, #definition, #definition?, #definition_children, #definition_name, #definition_of?, #definitions, #descendants, #id, #id_as_word, #inspect, #name, #stanza_version, #value, #voiced_as
Instance Attribute Details
#$1($1) ⇒ Object
6
|
# File 'lib/gitara/node/bar.rb', line 6
has_value :specified_duration
|
Instance Method Details
#note_sets ⇒ Object
8
9
10
|
# File 'lib/gitara/node/bar.rb', line 8
def note_sets
definition_children.select{|child| child.is_a?(Node::NoteSet)}
end
|
#specified_duration ⇒ Object
6
|
# File 'lib/gitara/node/bar.rb', line 6
has_value :specified_duration
|
#specified_duration_as_lilypond ⇒ Object
12
13
14
|
# File 'lib/gitara/node/bar.rb', line 12
def specified_duration_as_lilypond
specified_duration ? "\\partial #{specified_duration}" : nil
end
|
#stanza_heading ⇒ Object
16
17
18
|
# File 'lib/gitara/node/bar.rb', line 16
def stanza_heading
specified_duration ? "r#{specified_duration}" : ancestor(Node::Tab).time_signature.rest_bar_value
end
|